package com.prs.crm.service.hr;

import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

import org.jfree.data.general.AbstractDataset;
import com.prs.crm.domain.hr.Check;
import com.prs.crm.domain.hr.Dept;
import com.prs.crm.domain.hr.Person;
import com.prs.crm.domain.hr.Role;
import com.prs.crm.service.BaseService;

public interface PersonService extends BaseService<Person>{

	void removePerson(Person p);
	
	boolean login(String usrname,String  password);
	
	Collection<Person> getDeptRolePersons(Dept dept,Role role);
	
	Collection<Person> findByDept(Dept dept);
	
	Collection<Person> findPersons(Collection<Integer> ids);
	
	 Collection<Person> findAll();
	 Collection<Person>  getAllPerson();
	 public List<Person> getAllPersons();
	 /**
	 * 根据用户名查找用户
	 * @param username
	 * @param fuzzy 是否模糊查询
	 * @return
	 */
	Person findByUserName( String username,boolean fuzzy);
	Collection<Person> getRootPersonBySubordinate();
	
	/**
	 * 查找下一个用户
	 * @param person
	 * @return
	 */
	Person findNext(Person person);
	
	Person findPrev(Person person);
	
	Person findFirstPerson();
	
	
	Collection<?> getReportPersonRoleSource();
	Collection<?> getReportPersonDeptSource();
	Collection<?> getReportPersonJobTitleSource();
	AbstractDataset fillDataset(Collection<?> dataList, int GraphicsType);
	Collection<Dept> convertToDept(String ids);
	Collection<Check> convertToCheck(String ids);
	List<Person>  getNoticePerson(Role role);
	
	Person getByroot(String name);
	
	 void saveOrUpdate(Person person);
	Person getPersonByMovie(Integer  movieId, String userStyle);
	
	Person getPersonByTicketer(Integer  ticketerId,String userStyle);
	
	Integer delByPerson();
	Person getPersonById(Integer id);
	void saveCenterTable(Person person) throws SQLException;
}
